home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / patch / pgs30a.lha / 3.0aUpdate / Macros.LHA / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1994-09-22  |  10KB  |  312 lines

  1. /* $VER: TechReport.rexx 1.0a (22.9.94)
  2.    Copyright 1994 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21.  
  22. /* MAIN LOOP */
  23. call REGINFO()
  24. call SYSTEMINFO()
  25. call HELPSYSTEM()
  26. call ASSIGNS()
  27. call PROGRAMS()
  28. call LIBS()
  29. call FILTERS()
  30. call EFFECTS()
  31. call ENGINES()
  32. call COLORS()
  33. call CLEANUP()
  34.  
  35.  
  36. REGINFO:
  37. call writeln(.ofile, '')
  38. call writeln(.ofile, 'USER INFORMATION:')
  39. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  40.     else rcode=0
  41. user.name='Unknown'
  42. user.comp='Unknown'
  43. user.regn='Unknown'
  44. if rcode=0 then do
  45.     do until eof(.tfile)
  46.         temp=(readln(.tfile))
  47.         if left(temp,8)='USERNAME' then user.name=left(right(temp,length(temp)-10),length(temp)-11)
  48.         if left(temp,8)='USERCOMP' then user.comp=left(right(temp,length(temp)-13),length(temp)-14)
  49.         if left(temp,8)='USERREGN' then parse var temp dum user.regn .
  50.     end
  51.     call close(.tfile)
  52. end
  53. call writeln(.ofile, '  User Name................. '||user.name)
  54. call writeln(.ofile, '  Company................... '||user.comp)
  55. call writeln(.ofile, '  Registration Number....... '||user.regn)
  56. return rcode
  57.  
  58. SYSTEMINFO:
  59. call writeln(.ofile, '')
  60. call writeln(.ofile, 'SYSTEM INFORMATION:')
  61. 'version >'||tfilename
  62. temp=GETTEMP()
  63. call writeln(.ofile, '  '||temp)
  64. 'cpu >'||tfilename
  65. temp=GETTEMP()
  66. call writeln(.ofile, '  '||temp)
  67. call writeln(.ofile, '')
  68. 'avail >'||tfilename
  69. if ~open(.tfile, tfilename, 'R') then return 9
  70. do 4
  71.     temp=readln(.tfile)
  72.     call writeln(.ofile, '  '||temp)
  73. end
  74. call close(.tfile)
  75. return
  76.  
  77. HELPSYSTEM:
  78. call writeln(.ofile, '')
  79. call writeln(.ofile, 'HELP SYSTEM:')
  80. if exists('libs:amigaguide.library') then do
  81.     'version libs:amigaguide.library >'||tfilename
  82.     temp=GETTEMP()
  83.     parse var temp dum ver .
  84.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  85. end
  86. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  87. if exists('sys:Utilities/AmigaGuide') then do
  88.     'version sys:utilities/amigaguide >'||tfilename
  89.     temp=GETTEMP()
  90.     parse var temp dum ver .
  91.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  92.     agflag=1
  93. end
  94. else agflag=0
  95. if exists('sys:Utilities/Multiview') then do
  96.     'version sys:utilities/multiview >'||tfilename
  97.     temp=GETTEMP()
  98.     parse var temp dum ver .
  99.     call writeln(.ofile, '  MultiView program......... v'||ver)
  100.     mvflag=1
  101. end
  102. else mvflag=0
  103. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  104. return
  105.  
  106. ASSIGNS:
  107. call writeln(.ofile, '')
  108. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  109.  
  110. /* find out if the softlogik: assign was made */
  111. slassign=showlist('a','SOFTLOGIK')
  112. if slassign=1 then do
  113.     'assign SoftLogik: exists >'||tfilename
  114.     if ~open(.tfile, tfilename, 'R') then return 9
  115.     temp=(readln(.tfile))
  116.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  117.         parse var temp dum line
  118.         line=strip(line,'b')
  119.         call writeln(.ofile, '  SoftLogik................. '||line)
  120.     end
  121.     call close(.tfile)
  122. end
  123. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  124.  
  125. /* find out if the pagestream3: assign was made */
  126. pgsassign=showlist('a','PAGESTREAM3')
  127. if pgsassign=1 then do
  128.     'assign PageStream3: exists >'||tfilename
  129.     if ~open(.tfile, tfilename, 'R') then return 9
  130.     temp=(readln(.tfile))
  131.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  132.         parse var temp dum line
  133.         line=strip(line,'b')
  134.         call writeln(.ofile, '  PageStream3............... '||line)
  135.     end
  136.     call close(.tfile)
  137. end
  138. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  139.  
  140. /* find out if the fonts assign addition was made */
  141. 'assign fonts: exists >'||tfilename
  142. if ~open(.tfile, tfilename, 'R') then return 9
  143. line=nul
  144. do until eof(.tfile)
  145.     temp=(readln(.tfile))
  146.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  147. end
  148. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  149. call close(.tfile)
  150. call writeln(.ofile, '  Fonts..................... '||line||' add')
  151. return
  152.  
  153. PROGRAMS:
  154. call writeln(.ofile, '')
  155. call writeln(.ofile, 'PROGRAM FILES:')
  156. if exists('PageStream3:PageStream3') then do
  157.     'version PageStream3:PageStream3 >'||tfilename
  158.     temp=GETTEMP()
  159.     parse var temp dum ver .
  160.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  161.     ver='3'||right(ver,length(ver)-1)
  162.     call writeln(.ofile, '  PageStream3 program....... v'||ver)
  163. end
  164. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  165. if exists('PageStream3:BME') then do
  166.     'version PageStream3:BME >'||tfilename
  167.     temp=GETTEMP()
  168.     parse var temp dum ver .
  169.     call writeln(.ofile, '  BME program............... v'||ver)
  170. end
  171. else call writeln(.ofile, '  BME program............... MISSING!')
  172. if exists('PageStream3:PageLiner') then do
  173.     'version PageStream3:PageLiner >'||tfilename
  174.     temp=GETTEMP()
  175.     parse var temp dum ver .
  176.     call writeln(.ofile, '  PageLiner program......... v'||ver)
  177. end
  178. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  179. return
  180.  
  181. LIBS:
  182. call writeln(.ofile, '')
  183. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  184. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  185. temp=GETTEMP()
  186. parse var temp dum ver .
  187. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  188. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  189. temp=GETTEMP()
  190. parse var temp dum ver .
  191. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  192. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  193. temp=GETTEMP()
  194. parse var temp dum ver .
  195. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  196. return
  197.  
  198. FILTERS:
  199. call writeln(.ofile, '')
  200. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  201. if exists('SoftLogik:filters') then do
  202.     call GETFILES('softlogik:filters')
  203.     call SAYVERS('softlogik:filters')
  204.     end
  205. else do
  206.     call writeln(.ofile, '- Filters directory MISSING!')
  207. end
  208. return
  209.  
  210. EFFECTS:
  211. call writeln(.ofile, '')
  212. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  213. if exists('SoftLogik:effects') then do
  214.     call GETFILES('softlogik:effects')
  215.     call SAYVERS('softlogik:effects')
  216.     end
  217. else do
  218.     call writeln(.ofile, '- Effects directory MISSING!')
  219. end
  220.  
  221. /* PRINTERS */
  222. call writeln(.ofile, '')
  223. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  224. if exists('SoftLogik:printers') then do
  225.     call GETFILES('softlogik:printers')
  226.     call SAYVERS('softlogik:printers')
  227.     end
  228. else do
  229.     call writeln(.ofile, '- Printers directory MISSING!')
  230. end
  231. return
  232.  
  233. ENGINES:
  234. call writeln(.ofile, '')
  235. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  236. if exists('SoftLogik:engines') then do
  237.     call GETFILES('softlogik:engines')
  238.     call SAYVERS('softlogik:engines')
  239.     end
  240. else do
  241.     call writeln(.ofile, '- Engines directory MISSING!')
  242. end
  243. return
  244.  
  245. COLORS:
  246. call writeln(.ofile, '')
  247. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  248. if exists('SoftLogik:colors') then do
  249.     call GETFILES('softlogik:colors')
  250.     call SAYVERS('softlogik:colors')
  251.     end
  252. else do
  253.     call writeln(.ofile, '- Colors directory MISSING!')
  254. end
  255. return
  256.  
  257.  
  258. GETTEMP:
  259.     if ~open(.tfile, tfilename, 'R') then return 9
  260.     temp=readln(.tfile)
  261.     call close(.tfile)
  262. return temp
  263.  
  264. GETFILES:
  265.     parse arg path
  266.     Files=showdir(path,file,'|')
  267.     fLength=length(Files)
  268.     nList=0
  269.     DO WHILE fLength>0
  270.         cLength=pos('|',Files)
  271.         IF cLength=0 then DO
  272.             cLength=FLength+1
  273.             fLength=0
  274.         END
  275.         cFile=left(Files,cLength-1)
  276.         eFile=right(cFile,cLength-lastpos('.',cFile))
  277.         IF eFile~='.info' THEN DO
  278.             nList=nList+1
  279.             List.nList=cFile
  280.         END
  281.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  282.         fLength=fLength-cLength
  283.     END
  284. return
  285.  
  286. SAYVERS:
  287.     parse arg path
  288.     do count=1 to nlist
  289.         if right(list.count,5)~='.info' then do
  290.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' then do
  291.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  292.                 ver=' '||GETTEMP()||' bytes'
  293.             end
  294.             else do
  295.                 'version '||path||'/'||list.count||' >'||tfilename
  296.                 temp=GETTEMP()
  297.                 parse var temp dum ver .
  298.                 ver=' v'||ver
  299.             end
  300.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  301.         end
  302.     end
  303. return
  304.  
  305. CLEANUP:
  306. call close(.ofile)
  307. 'multiview '||ofilename
  308. if rc>0 then 'amigaguide '||ofilename
  309.  
  310. 'delete '||tfilename||' >NIL:'
  311. exit
  312.